//
//  HQAddModuleCell.m
//  MobileiOS
//
//  Created by 郝庆松 on 2018/5/11.
//  Copyright © 2018年 PCITC. All rights reserved.
//

#import "HQAddModuleCell.h"

@implementation HQAddModuleCell


-(void)setDataInfo:(id)dataInfo{
    _dataInfo = dataInfo;
    self.deleteItem.dataInfo = _dataInfo;
    self.editItem.dataInfo = _dataInfo;
    self.cName.text = [NSString stringWithFormat:@"%@/%@",_dataInfo[@"c_name"],_dataInfo[@"c_unit"]];
}

/**
 生成Cell
 
 @param tableView 列表
 @return ***
 */
+(instancetype)cellWithTableView:(UITableView*)tableView{
    static NSString *CellIdentifer = @"HQAddModuleCell";
    HQAddModuleCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifer];
    if(!cell){
        [tableView registerNib:[UINib nibWithNibName:CellIdentifer bundle:nil] forCellReuseIdentifier:CellIdentifer];
        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifer];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
